package com.haixiaoke.saas.repository.service.impl;

import com.haixiaoke.saas.repository.mapper.OrderWechatPayRecordMapper;
import com.haixiaoke.saas.repository.pojo.OrderWechatPayRecord;
import com.haixiaoke.saas.repository.service.IOrderWechatPayRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 小程序支付公寓订单回调结果记录Service业务层处理
 * 
 * @author panda
 * @date 2023-04-18
 */
@Service
public class OrderWechatPayRecordServiceImpl implements IOrderWechatPayRecordService {
    @Autowired
    private OrderWechatPayRecordMapper orderWechatPayRecordMapper;

    /**
     * 查询小程序支付公寓订单回调结果记录
     * 
     * @param id 小程序支付公寓订单回调结果记录主键
     * @return 小程序支付公寓订单回调结果记录
     */
    @Override
    public OrderWechatPayRecord selectOrderWechatPayRecordById(Long id) {
        return orderWechatPayRecordMapper.selectOrderWechatPayRecordById(id);
    }

    /**
     * 查询小程序支付公寓订单回调结果记录列表
     * 
     * @param orderWechatPayRecord 小程序支付公寓订单回调结果记录
     * @return 小程序支付公寓订单回调结果记录
     */
    @Override
    public List<OrderWechatPayRecord> selectOrderWechatPayRecordList(OrderWechatPayRecord orderWechatPayRecord)
    {
        return orderWechatPayRecordMapper.selectOrderWechatPayRecordList(orderWechatPayRecord);
    }

    /**
     * 新增小程序支付公寓订单回调结果记录
     * 
     * @param orderWechatPayRecord 小程序支付公寓订单回调结果记录
     * @return 结果
     */
    @Override
    public int insertOrderWechatPayRecord(OrderWechatPayRecord orderWechatPayRecord)
    {
        return orderWechatPayRecordMapper.insertOrderWechatPayRecord(orderWechatPayRecord);
    }

    /**
     * 修改小程序支付公寓订单回调结果记录
     * 
     * @param orderWechatPayRecord 小程序支付公寓订单回调结果记录
     * @return 结果
     */
    @Override
    public int updateOrderWechatPayRecord(OrderWechatPayRecord orderWechatPayRecord)
    {
        return orderWechatPayRecordMapper.updateOrderWechatPayRecord(orderWechatPayRecord);
    }

    /**
     * 批量删除小程序支付公寓订单回调结果记录
     * 
     * @param ids 需要删除的小程序支付公寓订单回调结果记录主键
     * @return 结果
     */
    @Override
    public int deleteOrderWechatPayRecordByIds(Long[] ids)
    {
        return orderWechatPayRecordMapper.deleteOrderWechatPayRecordByIds(ids);
    }

    /**
     * 删除小程序支付公寓订单回调结果记录信息
     * 
     * @param id 小程序支付公寓订单回调结果记录主键
     * @return 结果
     */
    @Override
    public int deleteOrderWechatPayRecordById(Long id)
    {
        return orderWechatPayRecordMapper.deleteOrderWechatPayRecordById(id);
    }

    @Override
    public OrderWechatPayRecord selectByOrderId(String orderId) {
        return orderWechatPayRecordMapper.selectByOrderId(orderId);
    }
}
